using NUnit.Framework;
using System;
using System.Collections.Generic;

namespace Tests {
    internal interface IMeeting {
        void ProcessAttendee(Person p);
    }
    internal class Usergroup : IMeeting {
        private string _topic;
        public Usergroup(string topic) {
            _topic = topic;
        }
        public void ProcessAttendee(Person p) {
            p.AddKnowledge(_topic);
        }
    }
    internal class Person {
        private List<string> _knowledgeBase = new List<string>();
        private string _name;
        public void AddKnowledge(string topic) {
            _knowledgeBase.Add(topic);
        }
        public void Attend(IMeeting meeting) {
            meeting.ProcessAttendee(this);
        }
        public bool Knows(string subject) {
            return _knowledgeBase.Contains(subject);
        }
        public Person(string name) {
            _name = name;
        }
    }
    [Ignore("Just a code sample")]
    [TestFixture]
    public class When_learning {
        [Test] public void will_be_more_awesome() {
            var p = new Person("Lana Learner");
            p.Attend(new Usergroup(".NET"));
            Assert.True(p.Knows(".NET"));
        }
    }
}
